🗒️

Chapter 14 Function

Run-time Stack

Activation Record / Stack Frame

When a function is called, its stack frame / activation record is pushed onto the run-time stack. When it returns, its frame popped off the stack.

R5: frame pointer, points to the beginning local variables for the current function (activation record).

R6: stack pointer

R5, frame pointer, the first local variable.

Activation Record: